using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spinning.Spinning.Entity;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Spinning.Spinning.Entity.Scenes;

namespace Spinning.Spinning.Level
{
    public class StageManager
    {
        public Scene CurrentScene { get; private set; }
        Dictionary<string, Scene> scenes;
        public int LifeTimeEarnByUser
        {
            get;
            set;
        }

        public StageManager()
        {
            scenes = new Dictionary<string, Scene>();
        }

        public void OnDraw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            if (CurrentScene != null)
            {
                CurrentScene.OnDraw(spriteBatch, gameTime);
            }
        }

        public void OnUpdate(GameTime gameTime)
        {
            if (CurrentScene != null)
                CurrentScene.OnUpdate(gameTime);
        }

        public void GoToScene(string scenrId)
        {
            CurrentScene = scenes[scenrId].Clone();
        }

        public void AddScene(string id, Scene scene)
        {
            scenes.Add(id, scene);
        }


    }
}
